This invention relates to security of data contained in a one-chip microcomputer which is configured to be one-time programmable (OTP) or multi-time programmable (MTP).
The conventional one-chip microcomputer is provided with a P-ROM to store a given program for carrying out an operation. Usually, a user for such one-chip microcomputer provides a self developed program to a vender for one-chip microcomputers. The vender performs writing of this program into a P-ROM of the one-chip microcomputer to deliver it to the user. In this manner, the user acquires a one-chip microcomputer stored with a program as desired.
In the meanwhile, it is readily determined by reading the program out of the P-ROM whether or not the program is properly written into the one-chip microcomputer delivered. However, the vender usually does not disclose an algorithm for reading a program out of a P-ROM to the user. If such algorism is disclosed, programs written for other users are also rendered readable from the same kind of one-chip microcomputers, making it impossible to sustain secrecy on programs for various users.
In this manner, it is impossible for the user to read a program stored in a delivered microcomputer. Therefore, the user usually tries to operate the one-chip microcomputer according to the program, thereby determining whether the program is correctly stored therein or not.
Under such situations, one-chip microcomputers referred to as OTP or MTP are now being used, with which the user can write or read a program.
However, the above-mentioned conventional one-chip microcomputer involves problems stated below.
First, in the case where a program of a one-chip microcomputer is operated to conduct a test on whether a desired function is available or not, it is impossible to determine whether bugs present in the program per se or whether storing is erroneous. There is another problem that executing a program to test the function thereof requires more labor than reading a program to confirm whether it agrees with an original one or not.
Second, a one-chip microcomputer of OTP or MPT is adapted to be written by a user. Accordingly, testing must be conducted on the user side whether writing of a program has been correctly done or not. Therefore, there arises a problem that an algorithm for reading the program has to be disclosed to users, making impossible to keep secrecy on the program written by a user.